package com.qf.hospital.system.mapper;

import com.qf.hospital.system.entity.Pharmacy;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface PharmacyMapper {
    int deleteByPrimaryKey(Integer pharmacyId);

    int insert(Pharmacy record);

    int insertSelective(Pharmacy record);

    Pharmacy selectByPrimaryKey(Integer pharmacyId);

    int updateByPrimaryKeySelective(Pharmacy record);

    int updateByPrimaryKey(Pharmacy record);

    // 查询全部药品信息
    List<Pharmacy> findByPharmacyName(String pharmacyName);

    // 扣减药品库存
    int updateNumByName(@Param("num")Integer num,@Param("name")String name);

    // 加药品库存
    int updateAddNumByName(@Param("num")Integer num,@Param("name")String name);
}